;Assembler header file for ColourMap
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:03:52 2005
;Tom Hughes, tom@compton.nu, 29 June 2003

        [       :LNOT: :DEF: ColourMap_Hdr
        GBLS    ColourMap_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_OSSpriteOp
        GBLS    Get_OSSpriteOp
        ]
        [       :LNOT: :DEF: OSSpriteOp_Hdr
Get_OSSpriteOp                  SETS    "GET oslib/OSSpriteOp.Hdr"
        |
Get_OSSpriteOp                  SETS    ""
        ]
        $Get_OSSpriteOp

;Symbols for SWI's and SWI reason codes
XColourMap_Start                *       &767C0
ColourMap_Start                 *       &567C0
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;Exit
   ;  R2 = size_used (Int)

XColourMap_ApplyMapping         *       &767C1
ColourMap_ApplyMapping          *       &567C1

ColourMapApplyMapping_User      *       &0
   ;Entry
   ;  R0 = &0 :OR: flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;  R3 -> mapping (OSSpriteOp_ColourMapping)
   ;Exit
   ;  R2 = size_required (Int)

ColourMapApplyMapping_Identity  *       &1
   ;Entry
   ;  R0 = &1 :OR: flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;Exit
   ;  R2 = size_required (Int)

ColourMapApplyMapping_Invert    *       &2
   ;Entry
   ;  R0 = &2 :OR: flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;Exit
   ;  R2 = size_required (Int)

ColourMapApplyMapping_Monochrome *       &3
   ;Entry
   ;  R0 = &3 :OR: flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;Exit
   ;  R2 = size_required (Int)

ColourMapApplyMapping_MonochromeAndScale *       &4
   ;Entry
   ;  R0 = &4 :OR: flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;  R3 = black (OS_Colour)
   ;  R4 = white (OS_Colour)
   ;Exit
   ;  R2 = size_required (Int)

ColourMapApplyMapping_Gamma     *       &5
   ;Entry
   ;  R0 = &5 :OR: flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;  R3 = gamma_level (Int)
   ;Exit
   ;  R2 = size_required (Int)

ColourMapApplyMapping_Contrast  *       &6
   ;Entry
   ;  R0 = &6 :OR: flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;  R3 = factor (Int)
   ;Exit
   ;  R2 = size_required (Int)

ColourMapApplyMapping_Brightness *       &7
   ;Entry
   ;  R0 = &7 :OR: flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;  R3 = offset (Int)
   ;Exit
   ;  R2 = size_required (Int)

ColourMapApplyMapping_Blend     *       &8
   ;Entry
   ;  R0 = &8 :OR: flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;  R3 = colour (OS_Colour)
   ;  R4 = factor (Int)
   ;Exit
   ;  R2 = size_required (Int)

XColourMap_End                  *       &767C2
ColourMap_End                   *       &567C2
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = workspace (pointer to data)
   ;  R2 = size (Int)
   ;Exit
   ;  R0 -> mapping (OSSpriteOp_ColourMapping)

        ]
        END
